import {httpPost,httpGet} from '@/utils/fetch'

export function getUserOpenId(params) { 
  return httpGet({
    url: `/applet/user/login?code=${params.code}&StoreId=${params.StoreId}`,
    method: 'get'
  })
}

// 用户登录唯一接口(密码模式)
export function appletLogin(params) {
  return httpPost({
    url: '/rich-sparrow-god/login/userLogin',
    method: 'POST',
    data: params
  })
}

// 创建店铺
export function createStore(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/addStore',
    method: 'POST',
    data: params
  })
}

// 查询全部店铺类型
export function getStoreTypeList(params) {
  return httpPost({
    url: '/gxe-saas-biz/store/getStoreTypeList',
    method: 'POST',
    data: params
  })
}

// 店铺基础信息
export function getStoreBase(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/getStoreBase',
    method: 'POST',
    data: params
  })
}

// 店铺切换列表
export function getStoreCutList(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/getStoreCutList',
    method: 'POST',
    data: params
  })
}

// 切换店铺
export function selectMyStore(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeUser/selectMyStore',
    method: 'POST',
    data: params
  })
}

// 新增充值金额
export function addRechargeAmount(params) {
  return httpPost({
    url: '/rich-sparrow-god/rechargeAmount/addRechargeAmount',
    method: 'POST',
    data: params
  })
}

// 删除充值金额
export function delRechargeAmount(params) {
  return httpPost({
    url: '/rich-sparrow-god/rechargeAmount/delRechargeAmount',
    method: 'POST',
    data: params
  })
}

// 查询充值金额列表
export function getRechargeAmountList(params) {
  return httpPost({
    url: '/rich-sparrow-god/rechargeAmount/getRechargeAmountList',
    method: 'POST',
    data: params
  })
}

// 编辑充值金额
export function updateRechargeAmount(params) {
  return httpPost({
    url: '/rich-sparrow-god/rechargeAmount/updateRechargeAmount',
    method: 'POST',
    data: params
  })
}

// 编辑回显
export function getById(params) {
  return httpPost({
    url: '/rich-sparrow-god/rechargeAmount/getById',
    method: 'POST',
    data: params
  })
}

// 新增优惠券
export function addCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/addCoupon',
    method: 'POST',
    data: params
  })
}

// 删除优惠券
export function delCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/delCoupon',
    method: 'POST',
    data: params
  })
}

// 分页查询优惠券
export function getCouponPage(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/getCouponPage',
    method: 'POST',
    data: params
  })
}

// 编辑优惠券
export function updateCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/updateCoupon',
    method: 'POST',
    data: params
  })
}

// 编辑回显
export function getCouponById(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/getById',
    method: 'POST',
    data: params
  })
}

// 新增房间类型
export function addRoomType(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/addRoomType',
    method: 'POST',
    data: params
  })
}

// 删除房间类型
export function delRoomType(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/delRoomType',
    method: 'POST',
    data: params
  })
}

// 创建房间
export function createRoom(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/addRoom',
    method: 'POST',
    data: params
  })
}

// 查询房间类型列表
export function getRoomTypeList(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/getRoomTypeList',
    method: 'POST',
    data: params
  })
}

// 编辑房间类型
export function updateRoomType(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/updateRoomType',
    method: 'POST',
    data: params
  })
}

// 编辑房间
export function updateRoom(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/updateRoom',
    method: 'POST',
    data: params
  })
}

// 房间列表
export function getRoomPageByStore(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/pageRoom',
    method: 'POST',
    data: params
  })
}

// 管理员开续电器
export function openRelays(params) {
  return httpPost({
    url: '/rich-sparrow-god/applet/room/openRelays',
    method: 'POST',
    data: params
  })
}

// 管理员关续电器
export function closeRelays(params) {
  return httpPost({
    url: '/rich-sparrow-god/applet/room/closeRelays',
    method: 'POST',
    data: params
  })
}

// 管理员开房间门
export function openRoomDoor(params) {
  return httpPost({
    url: '/rich-sparrow-god/applet/room/openRoomDoor',
    method: 'POST',
    data: params
  })
}

// 上下架
export function roomPutAway(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/setRoomStatus',
    method: 'POST',
    data: params
  })
}

// 编辑回显
export function getRoomById(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/getById',
    method: 'POST',
    data: params
  })
}

// 获取店铺续费单价
export function getStoreRenewAmount(params) {
  return httpPost({
    url: '/gxe-saas-biz/coupon/getStoreRenewAmount',
    method: 'POST',
    data: params
  })
}

// 店铺续费
export function renew(params) {
  return httpPost({
    url: '/gxe-saas-biz/coupon/renew',
    method: 'POST',
    data: params
  })
}

// 删除房间
export function delRoom(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/delRoom',
    method: 'POST',
    data: params
  })
}

// 查询问题反馈选项
export function getFeedbackOptionsList(params) {
  return httpPost({
    url: '/rich-sparrow-god/userProblemFeedback/getFeedbackOptionsList',
    method: 'POST',
    data: params
  })
}

// 商家提交问题反馈
export function addStoreFeedback(params) {
  return httpPost({
    url: '/gxe-saas-biz/storeFeedback/addStoreFeedback',
    method: 'POST',
    data: params
  })
}

// 分页查询店铺订单
export function getOrderPageByStore(params) {
  return httpPost({
    url: '/rich-sparrow-god/adminOrder/getOrderPage',
    method: 'POST',
    data: params
  })
}

// 查询店铺下空闲房间
export function getFreeRoom(params) {
  return httpPost({
    url: '/rich-sparrow-god/adminOrder/getFreeRoom',
    method: 'POST',
    data: params
  })
}

// 先付订单换房
export function preChangeRoom(params) {
  return httpPost({
    url: '/rich-sparrow-god/adminOrder/preChangeRoom',
    method: 'POST',
    data: params
  })
}

// 添加打扫商家账号
export function addDsStoreUser(params) {
  return httpPost({
    url: '/gxe-saas-biz/storeUser/addDsStoreUser',
    method: 'POST',
    data: params
  })
}

// 添加合伙人商家账号
export function addPartnerStoreUser(params) {
  return httpPost({
    url: '/gxe-saas-biz/storeUser/addPartnerStoreUser',
    method: 'POST',
    data: params
  })
}

// 添加负责人商家账号
export function addBrfStoreUser(params) {
  return httpPost({
    url: '/gxe-saas-biz/storeUser/addBrfStoreUser',
    method: 'POST',
    data: params
  })
}

// 获取首页数据
export function getStoreHomePage(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/getStoreHomePage',
    method: 'POST',
    data: params
  })
}

// 获取店铺最新订单信息
export function getLatestOrder(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/getLatestOrder',
    method: 'POST',
    data: params
  })
}

// 查询商家下级账号
export function getStoreUserList(params) {
  return httpPost({
    url: '/gxe-saas-biz/storeUser/getStoreUserList',
    method: 'POST',
    data: params
  })
}

// 删除商家下级账号
export function delStoreUser(params) {
  return httpPost({
    url: '/gxe-saas-biz/storeUser/delStoreUser',
    method: 'POST',
    data: params
  })
}

// 编辑店铺回显
export function getStoreById(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/getStoreById',
    method: 'POST',
    data: params
  })
}

// 编辑店铺
export function updateStore(params) {
  return httpPost({
    url: '/rich-sparrow-god/storeManager/updateStore',
    method: 'POST',
    data: params
  })
}

// 发放优惠券
export function giveOutCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/giveOutCoupon',
    method: 'POST',
    data: params
  })
}

// 查询发放记录
export function getGiveOutCouponList(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/getGiveOutCouponList',
    method: 'POST',
    data: params
  })
}

// 撤回发放
export function recallGetGiveOut(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/recallGetGiveOut',
    method: 'POST',
    data: params
  })
}

// 新增房间标签
export function addRoomLabel(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/addRoomLabel',
    method: 'POST',
    data: params
  })
}

// 删除房间标签
export function delRoomLabel(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/delRoomLabel',
    method: 'POST',
    data: params
  })
}

// 查询房间标签列表
export function getAllRoomLabelList(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/getAllRoomLabelList',
    method: 'POST',
    data: params
  })
}

// 编辑房间标签
export function updateRoomLabel(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/updateRoomLabel',
    method: 'POST',
    data: params
  })
}

// 新增房间套餐
export function addRoomThali(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomThaliPrice/addRoomThali',
    method: 'POST',
    data: params
  })
}

// 删除房间套餐
export function delRoomThali(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomThaliPrice/delRoomThali',
    method: 'POST',
    data: params
  })
}

// 查询房间套餐
export function getRoomThaliList(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomThaliPrice/getRoomThaliList',
    method: 'POST',
    data: params
  })
}

// 修改房间套餐
export function updateRoomThali(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomThaliPrice/updateRoomThali',
    method: 'POST',
    data: params
  })
}

// 新增房间小时
export function addRoomHour(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomHourPrice/addRoomHour',
    method: 'POST',
    data: params
  })
}

// 删除房间小时
export function delRoomHour(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomHourPrice/delRoomHour',
    method: 'POST',
    data: params
  })
}

// 查询房间小时
export function getRoomHourList(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomHourPrice/getRoomHourList',
    method: 'POST',
    data: params
  })
}

// 修改房间小时
export function updateRoomHour(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomHourPrice/updateRoomHour',
    method: 'POST',
    data: params
  })
}

// 设置房间状态
export function setRoomStatus(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/setRoomStatus',
    method: 'POST',
    data: params
  })
}

// 房间标签回显
export function getRoomLabelById(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/getRoomLabelById',
    method: 'POST',
    data: params
  })
}

// 房间类型回显
export function getRoomTypeById(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/getRoomTypeById',
    method: 'POST',
    data: params
  })
}

// 房间套餐回显
export function getRoomThali(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomThaliPrice/getRoomThali',
    method: 'POST',
    data: params
  })
}

// 房间小时回显
export function getRoomHourById(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomHourPrice/getRoomHourById',
    method: 'POST',
    data: params
  })
}

// 打扫完成
export function cleanFinish(params) {
  return httpPost({
    url: '/rich-sparrow-god/myorder/cleanFinish',
    method: 'POST',
    data: params
  })
}

// 新增会员等级
export function addVipLevelReq(params) {
  return httpPost({
    url: '/rich-sparrow-god/vipLevel/addVipLevelReq',
    method: 'POST',
    data: params
  })
}

// 删除会员等级
export function delVipLevelReq(params) {
  return httpPost({
    url: '/rich-sparrow-god/vipLevel/delVipLevelReq',
    method: 'POST',
    data: params
  })
}

// 查询会员等级
export function getVipLevelList(params) {
  return httpPost({
    url: '/rich-sparrow-god/vipLevel/getVipLevelList',
    method: 'POST',
    data: params
  })
}

// 编辑会员等级
export function updateVipLevelReq(params) {
  return httpPost({
    url: '/rich-sparrow-god/vipLevel/updateVipLevelReq',
    method: 'POST',
    data: params
  })
}

// 编辑回显
export function getVipLevelById(params) {
  return httpPost({
    url: '/rich-sparrow-god/vipLevel/getVipLevelById',
    method: 'POST',
    data: params
  })
}

// 新增攒星卡券
export function addCardCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/cardCoupon/addCardCoupon',
    method: 'POST',
    data: params
  })
}

// 删除攒星卡券
export function delCardCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/cardCoupon/delCardCoupon',
    method: 'POST',
    data: params
  })
}

// 攒星编辑回显
export function getCardCouponById(params) {
  return httpPost({
    url: '/rich-sparrow-god/cardCoupon/getCardCouponById',
    method: 'POST',
    data: params
  })
}

// 分页查询攒星卡券
export function getCardCouponPage(params) {
  return httpPost({
    url: '/rich-sparrow-god/cardCoupon/getCardCouponPage',
    method: 'POST',
    data: params
  })
}

// 攒星编辑卡券
export function updateCardCoupon(params) {
  return httpPost({
    url: '/rich-sparrow-god/cardCoupon/updateCardCoupon',
    method: 'POST',
    data: params
  })
}



// 新增活动
export function addActivity(params) {
  return httpPost({
    url: '/rich-sparrow-god/activity/addActivity',
    method: 'POST',
    data: params
  })
}

// 删除活动
export function delActivity(params) {
  return httpPost({
    url: '/rich-sparrow-god/activity/delActivity',
    method: 'POST',
    data: params
  })
}

// 查询活动列表
export function getActivityList(params) {
  return httpPost({
    url: '/rich-sparrow-god/activity/getActivityList',
    method: 'POST',
    data: params
  })
}

// 上-下架活动
export function upActivity(params) {
  return httpPost({
    url: '/rich-sparrow-god/activity/upActivity',
    method: 'POST',
    data: params
  })
}

// 编辑活动
export function updateActivity(params) {
  return httpPost({
    url: '/rich-sparrow-god/activity/updateActivity',
    method: 'POST',
    data: params
  })
}

// 查询优惠券列表
export function getCouponList(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/getCouponList',
    method: 'POST',
    data: params
  })
}

// 活动编辑回显
export function getHdById(params) {
  return httpPost({
    url: '/rich-sparrow-god/activity/getById',
    method: 'POST',
    data: params
  })
}

// 生成房间小程序码
export function createAppletCode(params) {
  return httpPost({
    url: '/rich-sparrow-god/roomManager/createAppletCode',
    method: 'POST',
    data: params
  })
}

// 查询未绑定活动的优惠券
export function getActivityCouponList(params) {
  return httpPost({
    url: '/rich-sparrow-god/coupon/getActivityCouponList',
    method: 'POST',
    data: params
  })
}

// 分页查询返券申请
export function getRebatePage(params) {
  return httpPost({
    url: '/rich-sparrow-god/rebateManager/getRebatePage',
    method: 'POST',
    data: params
  })
}

// 同意返券申请
export function agreeRebate(params) {
  return httpPost({
    url: '/rich-sparrow-god/rebateManager/agreeRebate',
    method: 'POST',
    data: params
  })
}

// 拒绝返券申请
export function refuseRebate(params) {
  return httpPost({
    url: '/rich-sparrow-god/rebateManager/refuseRebate',
    method: 'POST',
    data: params
  })
}

// 提前结束订单
export function earlyEndOrder(params) {
  return httpPost({
    url: '/rich-sparrow-god/adminOrder/earlyEndOrder',
    method: 'POST',
    data: params
  })
}

// 获取用户分组
export function getUserGroup(params) {
  return httpPost({
    url: '/rich-sparrow-god/workWx/getUserGroup',
    method: 'POST',
    data: params
  })
}